var { initPoints } = require("../points")
var { Point } = require("../point")
var len = 11

var ps = initPoints(len);

var Distance = require("../lib/distances")
Distance.setNUM_PARTICLES(len)
var distance = Distance.getDistances(ps)

/**
 * 随机的图// 随机不可到达路径
 * @param {number[][]} distance
 */
function genPic(distance) {
	var wdistance = []
	for (let index = 0; index < distance.length; index++) {
		const element = wdistance[index] = distance[index].concat();
		var len = element.length

		for (let j = 0; j < 5; j++) {
			// const element = array[j];
			element[Math.floor(Math.random() * len)] = Infinity
			//  无法到达路程。
		}
	}
	return wdistance
}


var distance = genPic(distance)